.NET Public Objects/Interfaces Supported
The .NET data provider supports the .NET public classes, interfaces, properties, and methods. The .NET data provider attaches the provider-specific prefix "SequeLink" to the names of the public objects, for example, SequeLinkConnection or SequeLinkCommand. In addition, the .NET data provider supports provider-specific properties and methods.
The .NET data provider supports the public .NET objects, properties, and methods described in the following sections. See ".NET Code Examples" for sample code that uses these objects.
SequeLinkCommand Object
In addition to the public properties of the Command object, the SequeLinkCommand object supports the properties described in Table 10-4. The table includes the generic public properties of the Command object when provider-specific information supplements the standard descriptions.
For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
SequeLinkCommandBuilder Object
The SequeLinkCommandBuilder object automatically generates single-table SQL commands that are used to reconcile changes made to a DataSet with the SequeLink server. A SequeLinkCommandBuilder object is always associated with a SequeLinkDataAdapter object.
Using a CommandBuilder object can have a negative effect on performance. Because of concurrency restrictions, the CommandBuilder does not generate efficient SQL statements. The end-user can often write more efficient update and delete statements than those that the CommandBuilder generates. In addition, the CommandBuilder object registers itself as a listener for the RowUpdating and RowUpdated events of its DataAdapter object. This means that two events must be processed for every row that is updated.
In addition to the public properties of the CommandBuilder object, the SequeLinkCommandBuilder object supports the following property. For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
SequeLinkConnection Object
In addition to the public properties of the Connection object, the SequeLinkConnection object supports the properties described in Table 10-6. Some properties return the values specified for the corresponding connection string attribute (see "Specifying Connection Options" for information on the connection string attributes).
For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
NOTE: To avoid dead connections being kept open on the database server, you must close or dispose every opened Connection object before it goes out of scope. Opened connections are not closed automatically when the memory is reclaimed by the garbage collector.
SequeLinkDataAdapter Object
The SequeLinkDataAdapter object uses SequeLinkCommand objects to execute SQL commands on the SequeLink Server database, to load the DataSet with data, and to reconcile the changed data in the DataSet to the database.
The SequeLinkDataAdapter object supports the public properties of the DataAdapter object and has no provider-specific properties. For information about the properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
SequeLinkDataReader Object
The SequeLinkDataReader object is a forward-only cursor that retrieves read-only records from a database. Performance is better than SequeLinkDataAdapter, but the result set cannot be modified.
For information about the properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
NOTE: To avoid statements or cursors being kept open on the database server, be sure to close or dispose each SequeLinkDataReader object as soon as you are finished reading with it.
SequeLinkError Object
The SequeLinkError object collects information relevant to errors and warnings generated by the SequeLink server.
For information about the properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
SequeLinkErrorCollection Object
The SequeLinkErrorCollection object is created by a SequeLinkException to contain all the errors generated by the SequeLink server.
The SequeLinkErrorCollection object supports the public properties of the ErrorCollection object, and has no provider-specific properties. For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
SequeLinkException Object
The SequeLinkException object is created and thrown when the SequeLink server returns an error. Exceptions generated by the data provider itself are returned as standard run time exceptions.
The SequeLinkException object supports the public properties of the Exception object, and has no provider-specific properties. The properties apply to the last error generated, if multiple errors exist. The application should check the Count property of the SequeLinkErrorCollection returned in the Errors property of this object to determine whether there are multiple errors.
For information about the properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
SequeLinkInfoMessageEventArgs Object
The SequeLinkInfoMessageEventArgs object is passed as an input to the SequeLinkInfoMessageEventHandler and contains information relevant to a warning generated by the SequeLink server. See "Error Handling" for an example of using InfoMessage delegates to retrieve warning information.
For information about SequeLinkInfoMessageEventArgs, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
SequeLinkParameter Object
The SequeLinkParameter object represents a parameter to a SequeLinkCommand. In addition to the public properties of the Parameter object, the SequeLinkParameter object supports the properties described in Table 10-7.
For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.
Table 10-7. Properties of the SequeLinkParameter Object Property Description ArrayBindStatus Determines whether any values in an array of SequeLinkParameterStatus entries should be bound as null. The SequeLinkParameterStatus enumeration contains the entry Null. SequeLinkDbType Specifies the data types of the SequeLink server.See "Data Types" for more information about SequeLink data types. Value Gets or sets the value of the parameter.This property is specified as an array of values when array binding is enabled (see the ArrayBindCount property of the "SequeLinkCommand Object"). Each array's length must match the value of the ArrayBindCount property. When specifying the array's values for binary type columns, the data will actually be specified as byte[]. This is an array of arrays of bytes. The data provider anticipates a jagged array as such when using parameter array binding with parameters.
SequeLinkTrace Object
The SequeLinkTrace object is created by the application to debug problems during development. For your final application, be sure to remove references to the SequeLinkTrace object. Setting the properties in the SequeLinkTrace object overrides the settings of the environment variables (see "Specifying Connection Options").
See "Using Environment Variables" for information about using environment variables.
The .NET data provider provides the option to create a Trace object to help application programmers debug problems during development. To maintain security, trace logs show passwords as five asterisks (*****).
The following code fragment creates a Trace object. All subsequent calls to the data provider will be traced to that file.
SequeLinkTrace MyTraceObject = new SequeLinkTrace(); MyTraceObject.TraceFile="C:\\MyTrace"; MyTraceObject.EnableTrace = 1;Table 10-8 provides the properties for the SequeLinkTrace object.
SequeLinkTransaction Object
The SequeLinkTransaction object implements the IDBTransaction interface as specified in the .NET Framework.
Table 10-9 provides the methods used by the SequeLinkTransaction object to support savepoints. For information about other properties and methods supported, refer to the data provider's online help and the Microsoft .NET Framework SDK documentation.